function isMobile() {
  var ua = navigator.userAgent.toLowerCase();
  var isWXWork = ua.match(/wxwork/i) == "wxwork";
  var isWeixin = !isWXWork && ua.match(/micromessenger/i) == "micromessenger";
  var isMobile = false;
  var isDesktop = false;
  isMobile = true;
  if (
    navigator.userAgent.match(
      /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|IEMobile)/i
    )
  ) {
    isMobile = true;
  } else {
    isDesktop = true;
  }

  return isMobile;
}

export { isMobile };
